import 'package:flutter/animation.dart';
import 'package:get/get.dart';
import 'package:turo/routers.dart';

class SplashLogic extends GetxController
    with GetSingleTickerProviderStateMixin {
  AnimationController? controller;
  Animation<double>? animation;

  @override
  void onInit() {
    controller =
        AnimationController(duration: const Duration(seconds: 2), vsync: this);
    animation = Tween<double>(begin: 0, end: 300).animate(controller!);
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
    AppRouter.startTab();
  }

  @override
  void onClose() {
    controller?.stop();
    controller?.dispose();
    super.onClose();
  }
}
